﻿<html>

<head>
<link rel="stylesheet" type="text/css" href="${def:context}/default.css" />
<title>安全管理</title>
</head>

<body>

<!--common header-->
${inc:${def:actionroot}/header}
<!--end of common header-->

<center>
[<a href="javascript:openPDF()">导出到PDF文件</a>]

<br><br>
</center>

<!--start of navigation controls-->
${inc:/action/paging-ctls}
<!--end of navigation controls-->

<center>

<!--START GRID-->
<table class="grid" width="80%" cellspacing="1">
	
	<tr>
	<th colspan="4"></th>
	<th width="20%">登录代码</th>
	<th width="20%">姓氏</th>
	<th width="15%">名称</th>
	<th width="40%">电子邮箱</th>
	<th width="10%">类型</th>
	</tr>
	
	<rows>
	<tr>
		<td align="center" ${fld:_rowStyle}>
			<img class="tool" src="${def:context}/images/table/edit.png" title="编辑记录"
				onclick="onEdit(${fld:user_id})">
		</td>
		<td align="center" ${fld:_rowStyle}>
			<img class="tool" src="${def:context}/images/table/delete.png" title="删除记录"
				onclick="onDelete(${fld:user_id})">
		</td>
		<td align="center" ${fld:_rowStyle}>
			<img class="tool" src="${def:context}/images/table/block.png" title="阻止用户"
				onclick="onBlock(${fld:user_id})">
		</td>
		<td align="center" ${fld:_rowStyle}>
			<img class="tool" src="${def:context}/images/table/encrypted.png" title="重新设置用户密码"
				onclick="onResetPwd(${fld:user_id})">
		</td>
		<td ${fld:_rowStyle}>
			${fld:userlogin}
		</td>
		<td ${fld:_rowStyle}>
			${fld:lname}
		</td>
		<td ${fld:_rowStyle}>
			${fld:fname}
		</td>
		<td ${fld:_rowStyle}>
			${fld:email}
		</td>
		<td ${fld:_rowStyle}>
			${fld:tipo}
		</td>
	</tr>
	</rows>
	
</table>
<!--END GRID-->

	<br>

	<input type="button"
	onclick="window.location='${def:context}${def:actionroot}/filter'"
	value="重新查询">

</center>

<script language="javascript">

	function onDelete(id, rowNum)
	{
		if (window.confirm("删除记录?")==true)
		{
			var returnURL = "${def:context}${def:actionroot}/view?pagenumber=" + currentPage
			var url = "${def:context}${def:actionroot}/delete?id=" + id + "&return.url=" + returnURL;
			window.location=url;
		}
	}
	
	function onEdit(id)
	{
		var returnURL = "${def:context}${def:actionroot}/view?pagenumber=" + currentPage
		var url = "${def:context}${def:actionroot}/editrediret?id=" + id + "&return.url=" + returnURL;
		window.location=url;
	}

	function onBlock(id)
	{
		if (window.confirm("Bloquear este usuario?")==true)
		{
			var returnURL = "${def:context}${def:actionroot}/view?pagenumber=" + currentPage
			var url="${def:context}${def:actionroot}/disable?id=" + id + "&return.url=" + returnURL;
			window.location=url;
		}
	}
	
	function onResetPwd(id)
	{
		var returnURL = "${def:context}${def:actionroot}/view?pagenumber=" + currentPage
		var url="${def:context}${def:actionroot}/newpass/form?id=" + id + "&return.url=" + returnURL;
		window.location=url;
	}	
	
	function openPDF()
	{	
		var features = "height=500,width=800,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes";
		var url = "${def:context}${def:actionroot}/pdf?random=" + Math.random();
		var w = window.open(url, null, features);
	}
	
</script>

</body>

</html>
